import request from "@/utils/request";
const url = "/user";

export function getQrcode() {
  return request({
    url: url + "/qrcode",
    method: "GET",
  });
}
export function chat(msg: string) {
  return request({
    url: url + "/chat",
    method: "POST",
    data: {
      msg,
    },
  });
}

export function sse() {
  return request({
    url: url + "/sse",
    method: "GET",
  });
}
export function getUserInfo(params: any) {
  return request({
    url: url + "/getUserInfo",
    method: "GET",
    params,
  });
}

export function bindingPhone(data: any) {
  return request({
    url: url + "/auth/phoneNo",
    method: "POST",
    data,
  });
}
export function updateUserInfo(data: any) {
  return request({
    url: url + "/editUserInfo",
    method: "POST",
    data,
  });
}
